import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';
//单条查询
export const querySysThirdPartyInfo = (params) => {
  params.head.transCode = 'querySysThirdPartyInfo';
  return request({
    url: '/platform/sysThirdPartyInfo/querySysThirdPartyInfo',
    method: 'post',
    data: params
  })
}
//多条列表查询，支持条件查询
export const querySysThirdPartyInfoListPage = (params) => {
  params.head.transCode = 'querySysThirdPartyInfoListPage';
  return request({
    url: '/platform/sysThirdPartyInfo/querySysThirdPartyInfoListPage',
    method: 'post',
    data: params
  })
}
//新增单条记录
export const saveSysThirdPartyInfo = (params) => {
  params.head.transCode = 'saveSysThirdPartyInfo';
  return request({
    url: '/platform/sysThirdPartyInfo/saveSysThirdPartyInfo',
    method: 'post',
    data: params
  })
}
//新增多条记录
export const saveSysThirdPartyInfoList = (params) => {
  params.head.transCode = 'saveSysThirdPartyInfoList';
  return request({
    url: '/platform/sysThirdPartyInfo/saveSysThirdPartyInfoList',
    method: 'post',
    data: params
  })
}
//新增或修改单条记录
export const saveOrUpdateSysThirdPartyInfo = (params) => {
  params.head.transCode = 'saveOrUpdateSysThirdPartyInfo';
  return request({
    url: '/platform/sysThirdPartyInfo/saveOrUpdateSysThirdPartyInfo',
    method: 'post',
    data: params
  })
}


//新增或修改单条记录
export const saveOrUpdateSysThirdPartyInfoList = (params) => {
  params.head.transCode = 'saveOrUpdateSysThirdPartyInfoList';
  return request({
    url: '/platform/sysThirdPartyInfo/saveOrUpdateSysThirdPartyInfoList',
    method: 'post',
    data: params
  })
}

//修改单条记录
export const updateSysThirdPartyInfo = (params) => {
  params.head.transCode = 'updateSysThirdPartyInfo';
  return request({
    url: '/platform/sysThirdPartyInfo/updateSysThirdPartyInfo',
    method: 'post',
    data: params
  })
}

//删除单条记录
export const deleteSysThirdPartyInfo = (params) => {
  params.head.transCode = 'deleteSysThirdPartyInfo';
  return request({
    url: '/platform/sysThirdPartyInfo/deleteSysThirdPartyInfo',
    method: 'post',
    data: params
  })
}

//删除多条记录
export const deleteSysThirdPartyInfoList = (params) => {
  params.head.transCode = 'deleteSysThirdPartyInfoList';
  return request({
    url: '/platform/sysThirdPartyInfo/deleteSysThirdPartyInfoList',
    method: 'post',
    data: params
  })
}
//导出excel
export const exportSysThirdPartyInfoExcel = (params) => {
  downloadExcel({
    url: '/platform/sysThirdPartyInfo/excelDownload/exportSysThirdPartyInfoExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
